﻿using System;

namespace ch11.binary
{
    public static class Errors
    {
        internal static readonly Exception ErrTrap = new("unreachable");
        internal static readonly Exception ErrUnexpectedEnd = new("unexpected end of section or function");
        internal static readonly Exception ErrIntTooLong = new("integer representation too long");
        internal static readonly Exception ErrIntTooLarge = new("integer too large");
        internal static readonly Exception ErrIntOverflow = new("integer overflow");
        internal static readonly Exception ErrConvertToInt = new("invalid conversion to integer");
        internal static readonly Exception ErrMemOutOfBounds = new("out of bounds memory access");
        internal static readonly Exception ErrImmutableGlobal = new("immutable global");
        internal static readonly Exception ErrUndefinedElem = new("undefined element");
        internal static readonly Exception ErrTypeMismatch = new("indirect call type mismatch");
    }
}